package com.design;

/**
 * 具体订阅者
 */
public class RealSubscriber implements Subscriber{
    private String name;
    public RealSubscriber(String name){
        this.name=name;
    }
    @Override
    public void onMessage(String channel, String message) {
        System.out.println("【"+name+"】收到【"+channel+"】的消息："+message);
    }
}
